﻿using Furion.DatabaseAccessor;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GSOrganization.Core
{
    public abstract class ProjectEntityBase : IEntity
    {
        [Column(TypeName = "datetime")]        
        public DateTime? CreatedTime { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? UpdatedTime { get; set; }
         
        [Key()] 
        [StringLength(36)]
        public string Id { get; set; }
        /// <summary>
        /// 是否删除；false：不删除；true：删除；
        /// </summary> 
        public bool? IsDel { get; set; } = false;
        [StringLength(36)]
        public string? CreateUserId { get; set; }
        [StringLength(36)]
        public string? UpdateUserId { get; set; }
        public ProjectEntityBase()
        {
            IsDel = false;
            CreatedTime = DateTime.Now;
            UpdatedTime = DateTime.Now;
            Id = Guid.NewGuid().ToString("N");
            //Id = "111111111122222222223333333333444444";
            CreateUserId = "1";//后台获取
            UpdateUserId = "1";
        }
    }
}
